<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>创建一个对象，使用function做为属性值</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
	
	<script type="text/javascript">
		
		var p = {
			id:1,
			name:'哈哈',
			isLove:true,
			home:['广州','深圳'],
			show : function(str){
				alert("你是" + str);
			}
		};
		
		//document.write(p.isLove?"已婚":"单身"+"<br/>");
		p.show("赵君");
		
	</script>
	
  </body>
</html>



